<script setup>
import {ref, defineProps} from 'vue'

const props = defineProps({
  info: {
    type: Object,
    required: true
  }
})

</script>

<template>
  <div class="message-card-container">
    <div class="info-container">
      <div class="above-container">
        <span class="name-box">
          <span class="name-text">{{info.companyInfo?.companyName}}</span>
          <span>{{info.jobInfo?.title}}</span>
          <i class="vline">|</i>
          <span>{{info.companyInfo?.phone}}</span>
        </span>
      </div>
      <div>{{info.resumeInfo?.fileName}}</div>
      <div class="below-container">
        <a-tag v-if="info.status==='pending'" color="blue">待通过</a-tag>
        <a-tag v-if="info.status==='accepted'" color="green">已通过</a-tag>
        <i class="vline"></i>
        <div>{{info.date}}</div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.message-card-container {
  height: 90px;
  display: flex;
  align-items: center;
  margin: 5px;
  cursor: pointer;
  padding: 10px;
}

.message-card-container:hover{
  border-radius: 5px;
  background-color: #f5f5f5;
}

.info-container {
  height: 90px;
  margin-left: 5px;
}

.above-container {
  width: 100%;
  text-align: center;
  align-items: center;
  display: flex;
  font-weight: 400;
  color: #333;
  line-height: 16px;
  margin-top: 20px;
}

.name-box {
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block;
}

.name-text {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  margin-right: 10px;
}

.vline {
  margin: 0 4px;
  font-size: 16px;
  color: rgba(153, 153, 153, 0.57);
}

.time-container {
  position: absolute;
  right: 40px;
  font-size: 16px;
  color: rgba(153, 153, 153, 0.8);
  margin-right: 15px;
}

.below-container {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 15px;
  >p{
    font-size: 14px;
    color: rgba(153, 153, 153, 0.8);
  }
}
</style>

